
public class Fruit {
    class Apple extends Fruit implements Comparable<Apple> {
        @Override
        public int compareTo(Apple o) {
            return 0;
        }
        class RedApple extends Apple {
        }

        class Orange extends Fruit {
        }

        class Melon {
        }
    }
}
